$.ajax({
    url:"http://localhost:3000/databases/list.json",
    success:(res)=>{
        let str = "";

        for (let key in res) {
            // console.log(res[key].name)
            str += `
            <div class="menu_box">
            <dl> 
                <dt class="fl">
                            <a href="#">
                                ${res[key].name}
                                <em>/</em>
                            </a>
                </dt>
             <dd class="fl rel">
                   ${h1(res[key])}
                </dd>
        <dd class="sub_menu">
            <div class="brand">
                <span>品牌</span>
                <ul>
                    ${h2(res[key])}
                </ul> 
            </div>
            <div class="hot">
                <span class="hot_txt">热词</span>
                    ${h1(res[key])}
            </div>
        </dd>
        </dl>   
        </div>     
            `
            $(".nav_left_menu").html(str)
        }   
        function h1(data){
            console.log(data)
            let str=""
            data.title.one.forEach(err=> {
                str +=
                `<a href="#">${err}</a> `
            });
            return str
        } 
        function h2(data){
            let str=""
            data.title.two.forEach(err=> {
                str +=
                `<li class="fl"><img src="${err}" alt=""></li>`
            });
            return str
        }
        
    },

    dataType:"json"
})
// $(".menu_box").on("mouseenter",function(){
//     $((".sub_menu")
// })
{/* <a href="#">${res[key].title.one[0]}</a>
<a href="#">${res[key].title.one[1]}</a>
<a href="#">${res[key].title.one[2]}</a> 

<a href="#">${res[key].title.one[0]}</a>
                <a href="#">${res[key].title.one[1]}</a>
                <a href="#">${res[key].title.one[2]}</a>


<li class="fl"><img src="${res[key].title.two[0]}" alt=""></li>
                    <li class="fl"><img src="${res[key].title.two[1]}" alt=""></li>
                    <li class="fl"><img src="${res[key].title.two[2]}" alt=""></li>
                    <li class="fl"><img src="${res[key].title.two[3]}" alt=""></li>
                    <li class="fl"><img src="${res[key].title.two[4]}" alt=""></li>
                    <li class="fl"><img src="${res[key].title.two[5]}" alt=""></li>
                    <li class="fl"><img src="${res[key].title.two[6]}" alt=""></li>
                    <li class="fl"><img src="${res[key].title.two[7]}" alt=""></li>
                    <li class="fl"><img src="${res[key].title.two[8]}" alt=""></li>
                    <li class="fl"><img src="${res[key].title.two[9]}" alt=""></li>*/}